<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>定位子元素不会参照父元素的padding</title>
	<style>
		.box{
			width: 200px;
			height: 200px;
			padding: 20px;
			box-sizing: border-box;
			position: relative;
			border:1px solid red;
		}
		.inner{
			width: 100%;
			height: 100%;
			position: absolute;
			border:1px solid #ccc;
			box-sizing: border-box;
			left: 0px;
			top: 0px;
		}
	</style>
</head>
<body>
	<div class="box">
		<div class="inner"></div>
	</div>
</body>
</html>